package com.yanqu.road.entity.activity.pawnshop;

import com.yanqu.road.entity.DataObject;
import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Objects;

@FieldTypeAnnotation(tableName = "t_u_activity_pawnshop_trigger")
public class PawnshopTriggerData extends DataObject {
    @FieldTypeAnnotation(update = true)
    private int id;
    @FieldTypeAnnotation(update = true)
    private long userId;
    @FieldTypeAnnotation(desc = "是否使用过")
    private boolean use;
    @FieldTypeAnnotation(desc = "标记时间")
    private long triggerTime;
    @FieldTypeAnnotation(desc = "使用时间")
    private long useTime;
    @FieldTypeAnnotation(select = true)
    private int activityId;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getTriggerTime() {
        return triggerTime;
    }

    public void setTriggerTime(long triggerTime) {
        this.triggerTime = triggerTime;
    }

    public int getActivityId() {
        return activityId;
    }

    public void setActivityId(int activityId) {
        this.activityId = activityId;
    }

    public boolean isUse() {
        return use;
    }

    public void setUse(boolean use) {
        if (!Objects.equals(this.use, use)) {
            this.use = use;
            setUpdateOption();
        }
    }

    public long getUseTime() {
        return useTime;
    }

    public void setUseTime(long useTime) {
        if (!Objects.equals(this.useTime, useTime)) {
            this.useTime = useTime;
            setUpdateOption();
        }
    }
}
